-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/pack stickers #37
base: main
Are you sure you want to change the base?
Conversation
Use standards-compliant commit messages https://www.conventionalcommits.org/en/v1.0.0/ |
{ | ||
// | ||
return $pack->stickers; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use json responses!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
laravel is atuomaticly convert model to json response so it will return like thi
{
"image": <image_path>,
"pack_id": <pack_id>
}
source: link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the following format
- If successful
{"status": bool, "data": dict}
- If it fails
{"status": bool, "message": string}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you have to follow the standards? because it will make it easier to process data
public function update(Request $request, Sticker $sticker) | ||
{ | ||
// | ||
return $sticker; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this?
} | ||
|
||
/** | ||
* Remove the specified resource from storage. | ||
*/ | ||
public function destroy(Sticker $sticker) | ||
public function destroy(Pack $pack, Sticker $sticker) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete the pack variable if it is not used
No description provided.